// DlgArray.cpp : implementation file
//

#include "stdafx.h"
#include "MotionControlSoftware.h"
#include "DlgArray.h"
#include "afxdialogex.h"


// CDlgArray dialog

IMPLEMENT_DYNAMIC(CDlgArray, CDialogEx)

CDlgArray::CDlgArray(CWnd* pParent /*=NULL*/)
	: CDialogEx(CDlgArray::IDD, pParent)
	, m_uiHorizontalCount(0)
	, m_uiVerticalCount(0)
	, m_dHorizontalInterval(0)
	, m_dVerticalInterval(0)
	, m_iIntervalType(0)
{

}

CDlgArray::~CDlgArray()
{
}

void CDlgArray::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT_HorizontalCount, m_uiHorizontalCount);
	DDV_MinMaxUInt(pDX, m_uiHorizontalCount, 0, 10000);
	DDX_Text(pDX, IDC_EDIT_VerticalCount, m_uiVerticalCount);
	DDV_MinMaxUInt(pDX, m_uiVerticalCount, 0, 10000);
	DDX_Text(pDX, IDC_EDIT_HorizontalInterval, m_dHorizontalInterval);
	DDV_MinMaxDouble(pDX, m_dHorizontalInterval, -10000, 10000);
	DDX_Text(pDX, IDC_EDIT_VerticalInterval, m_dVerticalInterval);
	DDV_MinMaxDouble(pDX, m_dVerticalInterval, -10000, 10000);
	DDX_Radio(pDX, IDC_RADIO_Distance, m_iIntervalType);
}


BEGIN_MESSAGE_MAP(CDlgArray, CDialogEx)
	ON_BN_CLICKED(IDOK, &CDlgArray::OnBnClickedOk)
END_MESSAGE_MAP()


// CDlgArray message handlers


void CDlgArray::OnBnClickedOk()
{
	// TODO: Add your control notification handler code here
	if (UpdateData(TRUE))
	{
	}
	CDialogEx::OnOK();
}


BOOL CDlgArray::OnInitDialog()
{
	CDialogEx::OnInitDialog();

	// TODO:  Add extra initialization here
	UpdateData(FALSE);
	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
